import { lazy } from "react";
import { Navigate } from "react-router-dom";

export default [
	{
		path: "/user",
		Component: lazy(() => import('@/layouts/UserLayout.jsx')),
		children: [
			{
				name: 'login',
				path: "/user/login",
				Component: lazy(() => import('@/pages/User/login/index.jsx')),
			},
			{
				name: 'register',
				path: '/user/register',
				Component: lazy(() => import('@/pages/User/register/index.jsx')),
			},
			{
				name: 'forgetpw',
				path: '/user/forgetpw',
				Component: lazy(() => import('@/pages/User/forgetPw/index.jsx')),
			},
			{
				path: '/user/*',
				element: <Navigate to="/user/login" />,
			},
		],
	},
	{
		path: '/404',
		Component: lazy(() => import('@/pages/404')),
	},
	{
		path: '/403',
		Component: lazy(() => import('@/pages/403')),
	},
]
